public class Integer_int {
    public static void main(String[] args) {
        Integer i = new Integer(10);
        Integer i2 =128;
        Integer i3 = 128;
        Integer i4 = new Integer(10);
        System.out.println(i==i2);
        System.out.println(i.equals(i4));
        System.out.println(i2==i3);//因为Integer有一个缓存区，赋相同的值，会直接从缓存区取，不会重新new一个对象
        Object o = i;
        Object o1 = i2;
        System.out.println(o.equals(o1));

    }
}
